home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_visible)
- {
- if(_currentframe == 1 || _currentframe == 2)
- {
- if(_X <= 0 || _X >= 800 || step > 11)
- {
- gotoAndPlay(3);
- }
- else
- {
- _X = _X + speedx;
- _Y = _Y + speedy;
- step++;
- if(step > 6)
- {
- if(Math.abs(speedx) > 2)
- {
- if(speedx > 0)
- {
- speedx -= 2;
- }
- else
- {
- speedx += 2;
- }
- }
- }
- speedy += 2;
- var i = -7;
- for(; i <= 7; i += 14)
- {
- cx = Math.floor((_X + i) / 40);
- cy = Math.floor(_Y / 40);
- switch(_level0.pole[cy][cx])
- {
- case 0:
- continue;
- case 1:
- if(_level0.pole[Math.floor((_Y + 8) / 40)][cx] != 0)
- {
- break;
- }
- continue;
- case 2:
- break;
- case 3:
- if(_Y - cy * 40 >= 40 - (_X - cx * 40))
- {
- gotoAndPlay(2);
- }
- continue;
- case 4:
- if(_Y - cy * 40 >= _X - cx * 40)
- {
- gotoAndPlay(2);
- }
- continue;
- default:
- continue;
- }
- gotoAndPlay(3);
- }
- monster_hit = false;
- var dy = -7;
- while(dy <= 7)
- {
- var dx = -7;
- while(dx <= 7)
- {
- var i = 1;
- while(i <= _level0.num_monsters)
- {
- if(!monster_hit && eval("_level0.monster" + i) != undefined)
- {
- if(!eval("_level0.monster" + i).boss && (_X + dx >= eval("_level0.monster" + i)._x - 6 && _X + dx <= eval("_level0.monster" + i)._x + 8) && (_Y + dy >= eval("_level0.monster" + i)._y - 11 && _Y + dy <= eval("_level0.monster" + i)._y + 28))
- {
- if(!eval("_level0.monster" + i).snow_ball)
- {
- _level0.snowball_count = _level0.snowball_count + 1;
- _level0.flyscore.duplicateMovieClip("flyscore" + _level0.snowball_count,1000 + _level0.snowball_count);
- eval("_level0.flyscore" + _level0.snowball_count).value = 10;
- eval("_level0.flyscore" + _level0.snowball_count).x = _X;
- eval("_level0.flyscore" + _level0.snowball_count).y = _Y;
- eval("_level0.flyscore" + _level0.snowball_count)._visible = true;
- }
- if(_currentframe == 1)
- {
- eval("_level0.monster" + i).frozen_count += 22;
- }
- else
- {
- eval("_level0.monster" + i).frozen_count += 44;
- }
- if(eval("_level0.monster" + i).frozen_count > 99)
- {
- eval("_level0.monster" + i).frozen_count = 174;
- }
- eval("_level0.monster" + i).snow_ball_hit = true;
- eval("_level0.monster" + i).ai_sost = 9;
- monster_hit = 3;
- gotoAndPlay(3);
- break;
- }
- }
- i++;
- }
- dx += 14;
- }
- dy += 14;
- }
- if(_level0.monster_clock1 != undefined)
- {
- if(_X >= _level0.monster_clock1._x - 20 && _X <= _level0.monster_clock1._x + 20 && (_Y >= _level0.monster_clock1._y - 32 && _Y <= _level0.monster_clock1._y + 32))
- {
- _level0.snowball_count = _level0.snowball_count + 1;
- _level0.flyscore.duplicateMovieClip("flyscore" + _level0.snowball_count,1000 + _level0.snowball_count);
- eval("_level0.flyscore" + _level0.snowball_count).value = 10;
- eval("_level0.flyscore" + _level0.snowball_count).x = _X;
- eval("_level0.flyscore" + _level0.snowball_count).y = _Y;
- eval("_level0.flyscore" + _level0.snowball_count)._visible = true;
- gotoAndPlay(3);
- }
- var i = 1;
- while(i <= _level0.monster_clock1.ghost_count)
- {
- if(eval("_level0.monster_ghost" + i) != undefined)
- {
- if(_X >= eval("_level0.monster_ghost" + i)._x - 12 && _X <= eval("_level0.monster_ghost" + i)._x + 12 && (_Y >= eval("_level0.monster_ghost" + i)._y - 10 && _Y <= eval("_level0.monster_ghost" + i)._y + 10))
- {
- _level0.snowball_count = _level0.snowball_count + 1;
- _level0.flyscore.duplicateMovieClip("flyscore" + _level0.snowball_count,1000 + _level0.snowball_count);
- eval("_level0.flyscore" + _level0.snowball_count).value = 10;
- eval("_level0.flyscore" + _level0.snowball_count).x = _X;
- eval("_level0.flyscore" + _level0.snowball_count).y = _Y;
- eval("_level0.flyscore" + _level0.snowball_count)._visible = true;
- gotoAndPlay(3);
- break;
- }
- }
- i++;
- }
- }
- }
- }
- }
- if(_currentframe == 8)
- {
- i = _level0.snowball_count;
- while(i > 0)
- {
- if(eval("_level0.snowball" + i) != undefined && "/snowball" + i != _target)
- {
- break;
- }
- if(eval("_level0.flyscore" + i) != undefined)
- {
- break;
- }
- if(eval("_level0.bonus_hint" + i) != undefined)
- {
- break;
- }
- if(eval("_level0.bubbleballsplinter" + i) != undefined)
- {
- break;
- }
- if(eval("_level0.bubbleball" + i) != undefined)
- {
- break;
- }
- if(eval("_level0.bonus" + i) != undefined)
- {
- break;
- }
- i--;
- }
- _level0.snowball_count = i;
- this.removeMovieClip();
- }
- }
-